package clone;

public class Person implements Cloneable {
    private String name;
    private int id;

    public Person(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public Person clone() throws CloneNotSupportedException {
        Person cloned = (Person) super.clone();
        return cloned;
    }

    @Override
    public String toString() {
        return getClass().getName() + "[name=" + this.name
                + ", id=" + this.id + "]";
    }
}
